//
//  ChatBaseTableViewCell.h
//  供销宝
//
//  Created by 金晶 on 17/2/14.
//  Copyright © 2017年 金晶. All rights reserved.
//

#import <UIKit/UIKit.h>
#import "ChatMessage.h"
#import "ChatTableView.h"

@interface ChatBaseTableViewCell : UITableViewCell

@property (nonatomic,strong) UILabel *timeLabel;

@property (nonatomic,strong) UILabel *nickNameLabel;

@property (nonatomic,strong) UILabel *notificationLabel;

@property (nonatomic,strong) UIImageView *contextBack;

@property (nonatomic,strong) UIImageView *logoImage;            //头像

@property (nonatomic,strong) UILabel *textMessageLabel;         //文本内容

@property (nonatomic,strong) UIImageView* coversImageView;

@property (nonatomic,strong) UIImageView *imageViewMask;

@property (nonatomic,strong) UIImageView* voiceAnimationImageView;

@property (nonatomic,strong) UIActivityIndicatorView *acview;

@property (nonatomic,strong) UIButton *retryButton;

@property (nonatomic,strong) UITableView *myTableView;

@property (nonatomic,strong) ChatMessage *chatMdl;

@property (nonatomic,strong) NSString *friendImageStr;

@property (nonatomic,copy) void(^imageClickBlock)();
/**头像点击block*/
@property (nonatomic,copy) void(^iconImageClickBlock)();

@property (nonatomic,copy) void(^selectVoiceBlock)(NSIndexPath *);

@property (nonatomic,copy) void(^removeChatInfoBlock)(ChatMessage *);     //长按删除聊天信息

@property (nonatomic,assign) BOOL isShowName;

@property (nonatomic,assign) CGFloat showNameTop;

+ (UITableViewCell *)cellWithTableView:(ChatTableView *)tableView messageModel:(ChatMessage *)model;

+ (CGFloat)cellHeightWithModel:(ChatMessage *)model;


- (CGFloat)returnNameTop:(BOOL)isShow;

//计算高度
- (CGRect)getContentWidth:(CGFloat)maxWith withcontent:(NSString *)str;

//加载菜单栏
- (void)showMenuControllerInView:(UITableViewCell *)inView
                          bgView:(UIView *)supView;


//如果是语音。要点击播放，如果是图片，可能要点击放大.可以重写此方法。不必要判断是哪种类型
- (void)handleSingleTap:(UITapGestureRecognizer *)sender;

//如果是语音。要点击播放，如果是图片，可能要点击放大
- (void)handleDoubleTap:(UITapGestureRecognizer *)sender;

- (void)loadUserPic:(NSString *)friendStr ChatMdl:(ChatMessage *)chatMdl;

@end
